<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>支付成功</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/pay_success.css"/>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/jquery.cookie.js"></script>
</head>
<body>
    <div class="container" id="orderinfo"></div>
    <script type="text/javascript">
        
        var order = location.search.split("=")[1].split("&")[0];
        
        var price = location.search.split("=")[2];
        
        var ht = '<div class="row">\n' +
            '            <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3"></div>\n' +
            '            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6" id="info">\n' +
            '                <p>恭喜您，购买成功</p>\n' +
            '                <p>订单编号：<span>'+ order +'</span></p>\n' +
            '                <p>支付金额：<span>￥'+ price +'</span></p>\n' +
            '                <p id="retutnp">5s后自动<a href="index.html">返回首页</a></p>\n' +
            '            </div>\n' +
            '        </div>';
        
        $("#orderinfo").html(ht);

        function five(time) {
            if (time == 0){
                location.href = "index.html";
            }else {
                time--;
                $("#retutnp").html( time + "s后自动<a href=\"index.html\">返回首页</a>");
            }
            setTimeout(function () {
                five(time);
            },1000);
        }
        five(5);
        
    </script>
</body>
</html>